﻿using System;
using System.Collections.Generic;
using System.Text;

namespace KingOfCSharp.iHunter
{
    class EditorProviderWrapper : PluginWrapper, IEditorProvider
    {
        IEditorProvider editorProvider;

        public EditorProviderWrapper(IEditorProvider editorProvider)
            : base(editorProvider)
        {
            this.editorProvider = editorProvider;
        }


        #region IEditorProvider Members

        public IMessageEditor CreateEditorInstance()
        {
            try
            {
                return editorProvider.CreateEditorInstance();
            }
            catch (Exception e)
            {
                this.OnPluginError(e);
                return null;
            }
        }

        #endregion
    }
}
